<template>
  <view>
    <z-navbar :title="navTitle" :border-bottom="true"></z-navbar>
    <view class="px-4 pt-5" v-html="content"></view>
  </view>
</template>

<script setup>
import { useCommonStore } from '@/store/common'

const useCommon = useCommonStore()

const navTitle = ref('')
// societyRule-学社规则 userRule-用户协议 vipRule-会员服务协议 privateRule-隐私协议
const type = ref('')
const content = computed(() => useCommon[type.value])

onLoad((options) => {
  navTitle.value = options?.title ?? '协议'
  type.value = options?.type
})
</script>

<style lang='scss' scoped>

</style>
